package com.hyb.hybmodulesblog.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hyb.hybmodulesblog.mapper.ApproveTribeUserMapper;
import com.hyb.hybmodulesblog.domain.ApproveTribeUser;
import com.hyb.hybmodulesblog.service.IApproveTribeUserService;

/**
 * 用户申请加入部落表的增删改查Service业务层处理
 * 
 * @author hyb
 * @date 2023-03-11
 */
@Service
public class ApproveTribeUserServiceImpl implements IApproveTribeUserService 
{
    @Autowired
    private ApproveTribeUserMapper approveTribeUserMapper;

    /**
     * 查询用户申请加入部落表的增删改查
     * 
     * @param id 用户申请加入部落表的增删改查主键
     * @return 用户申请加入部落表的增删改查
     */
    @Override
    public ApproveTribeUser selectApproveTribeUserById(Long id)
    {
        return approveTribeUserMapper.selectApproveTribeUserById(id);
    }

    /**
     * 查询用户申请加入部落表的增删改查列表
     * 
     * @param approveTribeUser 用户申请加入部落表的增删改查
     * @return 用户申请加入部落表的增删改查
     */
    @Override
    public List<ApproveTribeUser> selectApproveTribeUserList(ApproveTribeUser approveTribeUser)
    {
        return approveTribeUserMapper.selectApproveTribeUserList(approveTribeUser);
    }

    /**
     * 新增用户申请加入部落表的增删改查
     * 
     * @param approveTribeUser 用户申请加入部落表的增删改查
     * @return 结果
     */
    @Override
    public int insertApproveTribeUser(ApproveTribeUser approveTribeUser)
    {
        approveTribeUser.setCreateTime(DateUtils.getNowDate());
        return approveTribeUserMapper.insertApproveTribeUser(approveTribeUser);
    }

    /**
     * 修改用户申请加入部落表的增删改查
     * 
     * @param approveTribeUser 用户申请加入部落表的增删改查
     * @return 结果
     */
    @Override
    public int updateApproveTribeUser(ApproveTribeUser approveTribeUser)
    {
        approveTribeUser.setUpdateTime(DateUtils.getNowDate());
        return approveTribeUserMapper.updateApproveTribeUser(approveTribeUser);
    }

    /**
     * 批量删除用户申请加入部落表的增删改查
     * 
     * @param ids 需要删除的用户申请加入部落表的增删改查主键
     * @return 结果
     */
    @Override
    public int deleteApproveTribeUserByIds(Long[] ids)
    {
        return approveTribeUserMapper.deleteApproveTribeUserByIds(ids);
    }

    /**
     * 删除用户申请加入部落表的增删改查信息
     * 
     * @param id 用户申请加入部落表的增删改查主键
     * @return 结果
     */
    @Override
    public int deleteApproveTribeUserById(Long id)
    {
        return approveTribeUserMapper.deleteApproveTribeUserById(id);
    }
}
